// src/api/theory.js
import request from '@/utils/request'

export function createStudy(data) {
	return request({ url: '/api/theory', method: 'post', data })
}
export function getMyStudies() {
	return request({ url: '/api/theory/mine', method: 'get' })
}
export function updateStudy(id, data) {
	return request({ url: `/api/theory/${id}`, method: 'put', data })
}
export function deleteStudy(id) {
	return request({ url: `/api/theory/${id}`, method: 'delete' })
}
// admin
export function getAllStudies(params) {
	return request({ url: '/api/theory/all', method: 'get', params })
} 

export function reviewStudy(id, data) {
    return request({ url: `/api/theory/${id}/review`, method: 'post', data })
}